﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.Generic;

namespace Nok_Air.NokObjects
{
    public class PassengerItemViewModel : INotifyPropertyChanged
    {
        private List<NokObjects.Passenger> _ADULT;
        public List<NokObjects.Passenger> ADULT
        {
            get
            {
                return _ADULT;
            }
            set
            {
                if (value != _ADULT)
                {
                    _ADULT = value;
                    NotifyPropertyChanged("ADULT");
                }
            }
        }

        private List<NokObjects.Passenger> _CHD;
        public List<NokObjects.Passenger> CHD
        {
            get
            {
                return _CHD;
            }
            set
            {
                if (value != _CHD)
                {
                    _CHD = value;
                    NotifyPropertyChanged("CHD");
                }
            }
        }
        private NokObjects.Contact _contact;
        public NokObjects.Contact contact
        {
            get
            {
                return _contact;
            }
            set
            {
                if (value != _contact)
                {
                    _contact = value;
                    NotifyPropertyChanged("contact");
                }
            }
        }
        
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
    public class Passenger : INotifyPropertyChanged
    {
        //string for display
        public string ContactInfoAdult
        {
            get
            {
                return App.ViewModel.ContactInfoAdult;
            }
            //   set; 
        }
        public string ContactInfoChild
        {
            get
            {
                return App.ViewModel.ContactInfoChild;
            }
            //   set; 
        }
        public string Prefix
        {
            get
            {
                return App.ViewModel.Prefix;
            }
         //   set;
        }
        public string FirstName
        {
            get
            {
                return App.ViewModel.FirstName;
            }
          //  set;
        }
        public string LastName
        {
            get
            {
                return App.ViewModel.LastName;
            }
          //  set;
        }





        private string _title = "";
        public string title
        {
            get
            {
                return _title;
            }
            set
            {
                if (value != _title)
                {
                    _title = value;
                    NotifyPropertyChanged("title");
                }
            }
        }

        private string _firstname = "";
        public string firstname
        {
            get
            {
                return _firstname;
            }
            set
            {
                if (value != _firstname)
                {
                    _firstname = value;
                    NotifyPropertyChanged("firstname");
                }
            }
        }

        private string _lastname = "";
        public string lastname
        {
            get
            {
                return _lastname;
            }
            set
            {
                if (value != _lastname)
                {
                    _lastname = value;
                    NotifyPropertyChanged("lastname");
                }
            }
        }


        private string _passcode = "";
        public string passcode
        {
            get
            {
                return _passcode;
            }
            set
            {
                if (value != _passcode)
                {
                    _passcode = value;
                    NotifyPropertyChanged("passcode");
                }
            }
        }


        private string _titleIsEmpty = "Collapsed";
        public string titleIsEmpty
        {
            get
            {
                return _titleIsEmpty;
            }
            set
            {
                if (value != _titleIsEmpty)
                {
                    _titleIsEmpty = value;
                    NotifyPropertyChanged("titleIsEmpty");
                }
            }
        }

        private string _firstnameIsEmpty = "Collapsed";
        public string firstnameIsEmpty
        {
            get
            {
                return _firstnameIsEmpty;
            }
            set
            {
                if (value != _firstnameIsEmpty)
                {
                    _firstnameIsEmpty = value;
                    NotifyPropertyChanged("firstnameIsEmpty");
                }
            }
        }

        private string _lastnameIsEmpty = "Collapsed";
        public string lastnameIsEmpty
        {
            get
            {
                return _lastnameIsEmpty;
            }
            set
            {
                if (value != _lastnameIsEmpty)
                {
                    _lastnameIsEmpty = value;
                    NotifyPropertyChanged("lastnameIsEmpty");
                }
            }
        }


        private string _passcodeIsEmpty = "Collapsed";
        public string passcodeIsEmpty
        {
            get
            {
                return _passcodeIsEmpty;
            }
            set
            {
                if (value != _passcodeIsEmpty)
                {
                    _passcodeIsEmpty = value;
                    NotifyPropertyChanged("passcodeIsEmpty");
                }
            }
        }       
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
    public class Contact : INotifyPropertyChanged
    {
        public string ContactInfo
        {
            get
            {
                return App.ViewModel.ContactInfo;
            }
            //   set; 
        }
        public string Country
        {
            get
            {
                return App.ViewModel.Country;
            }
            //   set; 
        }
        public string Phone
        {
            get
            {
                return App.ViewModel.Phone;
            }
            //   set; 
        }
        public string MobilePhone
        {
            get
            {
                return App.ViewModel.MobilePhone;
            }
            //   set; 
        }
        public string PhoneNumberNotice
        {
            get
            {
                return App.ViewModel.PhoneNumberNotice;
            }
            //   set; 
        }
        public string Email
        {
            get
            {
                return App.ViewModel.Email;
            }
            //   set; 
        }


        private string _addr1 = "";
        public string addr1
        {
            get
            {
                return _addr1;
            }
            set
            {
                if (value != _addr1)
                {
                    _addr1 = value;
                    NotifyPropertyChanged("addr1");
                }
            }
        }

        private string _addr2 = "";
        public string addr2
        {
            get
            {
                return _addr2;
            }
            set
            {
                if (value != _addr2)
                {
                    _addr2 = value;
                    NotifyPropertyChanged("addr2");
                }
            }
        }

        private string _city = "";
        public string city
        {
            get
            {
                return _city;
            }
            set
            {
                if (value != _city)
                {
                    _city = value;
                    NotifyPropertyChanged("city");
                }
            }
        }

        private string _state = "";
        public string state
        {
            get
            {
                return _state;
            }
            set
            {
                if (value != _state)
                {
                    _state = value;
                    NotifyPropertyChanged("state");
                }
            }
        }

        private string _country = "";
        public string country
        {
            get
            {
                return _country;
            }
            set
            {
                if (value != _country)
                {
                    _country = value;
                    NotifyPropertyChanged("country");
                }
            }
        }

        private string _postcode = "";
        public string postcode
        {
            get
            {
                return _postcode;
            }
            set
            {
                if (value != _postcode)
                {
                    _postcode = value;
                    NotifyPropertyChanged("postcode");
                }
            }
        }

        private string _mobile = "";
        public string mobile
        {
            get
            {
                return _mobile;
            }
            set
            {
                if (value != _mobile)
                {
                    _mobile = value;
                    NotifyPropertyChanged("mobile");
                }
            }
        }

        private string _homephone = "";
        public string homephone
        {
            get
            {
                return _homephone;
            }
            set
            {
                if (value != _homephone)
                {
                    _homephone = value;
                    NotifyPropertyChanged("homephone");
                }
            }
        }

        private string _officephone = "";
        public string officephone
        {
            get
            {
                return _officephone;
            }
            set
            {
                if (value != _officephone)
                {
                    _officephone = value;
                    NotifyPropertyChanged("officephone");
                }
            }
        }

        private string _email = "";
        public string email
        {
            get
            {
                return _email;
            }
            set
            {
                if (value != _email)
                {
                    _email = value;
                    NotifyPropertyChanged("email");
                }
            }
        }

        private string _agentphone = "";
        public string agentphone
        {
            get
            {
                return _agentphone;
            }
            set
            {
                if (value != _agentphone)
                {
                    _agentphone = value;
                    NotifyPropertyChanged("agentphone");
                }
            }
        }

        private string _addr1IsEmpty = "Collapsed";
        public string addr1IsEmpty
        {
            get
            {
                return _addr1IsEmpty;
            }
            set
            {
                if (value != _addr1IsEmpty)
                {
                    _addr1IsEmpty = value;
                    NotifyPropertyChanged("addr1IsEmpty");
                }
            }
        }

        private string _addr2IsEmpty = "Collapsed";
        public string addr2IsEmpty
        {
            get
            {
                return _addr2IsEmpty;
            }
            set
            {
                if (value != _addr2IsEmpty)
                {
                    _addr2IsEmpty = value;
                    NotifyPropertyChanged("addr2IsEmpty");
                }
            }
        }

        private string _cityIsEmpty = "Collapsed";
        public string cityIsEmpty
        {
            get
            {
                return _cityIsEmpty;
            }
            set
            {
                if (value != _cityIsEmpty)
                {
                    _cityIsEmpty = value;
                    NotifyPropertyChanged("cityIsEmpty");
                }
            }
        }

        private string _stateIsEmpty = "Collapsed";
        public string stateIsEmpty
        {
            get
            {
                return _stateIsEmpty;
            }
            set
            {
                if (value != _stateIsEmpty)
                {
                    _stateIsEmpty = value;
                    NotifyPropertyChanged("stateIsEmpty");
                }
            }
        }

        private string _countryIsEmpty = "Collapsed";
        public string countryIsEmpty
        {
            get
            {
                return _countryIsEmpty;
            }
            set
            {
                if (value != _countryIsEmpty)
                {
                    _countryIsEmpty = value;
                    NotifyPropertyChanged("countryIsEmpty");
                }
            }
        }

        private string _postcodeIsEmpty = "Collapsed";
        public string postcodeIsEmpty
        {
            get
            {
                return _postcodeIsEmpty;
            }
            set
            {
                if (value != _postcodeIsEmpty)
                {
                    _postcodeIsEmpty = value;
                    NotifyPropertyChanged("postcodeIsEmpty");
                }
            }
        }

        private string _mobileIsEmpty = "Collapsed";
        public string mobileIsEmpty
        {
            get
            {
                return _mobileIsEmpty;
            }
            set
            {
                if (value != _mobileIsEmpty)
                {
                    _mobileIsEmpty = value;
                    NotifyPropertyChanged("mobileIsEmpty");
                }
            }
        }

        private string _homephoneIsEmpty = "Collapsed";
        public string homephoneIsEmpty
        {
            get
            {
                return _homephoneIsEmpty;
            }
            set
            {
                if (value != _homephoneIsEmpty)
                {
                    _homephoneIsEmpty = value;
                    NotifyPropertyChanged("homephoneIsEmpty");
                }
            }
        }

        private string _officephoneIsEmpty = "Collapsed";
        public string officephoneIsEmpty
        {
            get
            {
                return _officephoneIsEmpty;
            }
            set
            {
                if (value != _officephoneIsEmpty)
                {
                    _officephoneIsEmpty = value;
                    NotifyPropertyChanged("officephoneIsEmpty");
                }
            }
        }

        private string _emailIsEmpty = "Collapsed";
        public string emailIsEmpty
        {
            get
            {
                return _emailIsEmpty;
            }
            set
            {
                if (value != _emailIsEmpty)
                {
                    _emailIsEmpty = value;
                    NotifyPropertyChanged("emailIsEmpty");
                }
            }
        }

        private string _agentphoneIsEmpty = "Collapsed";
        public string agentphoneIsEmpty
        {
            get
            {
                return _agentphoneIsEmpty;
            }
            set
            {
                if (value != _agentphoneIsEmpty)
                {
                    _agentphoneIsEmpty = value;
                    NotifyPropertyChanged("agentphoneIsEmpty");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}